<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>商品扩展属性管理</title>
    <link rel="shortcut icon" href="favicon.ico">
    <script src="../../res/js/comm.js?v=1.22.0"></script>
    <link href="../../res/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="../../res/plugins/channel/css/yfCityStore.css" rel="stylesheet">
    <link href="../../res/plugins/select2/css/select2.min.css" rel="stylesheet">
    <link href="../../res../res/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css" rel="stylesheet">
    <script src="../../res/plugins/select2/js/select2.min.js"></script>
    <script src="../../res/plugins/yifeng/channel.js"></script>
    <script src="../../res/plugins/chosen/js/chosen.jquery.js"></script>
    <style> .select2-container--open {
        z-index: 10000000000
    }  </style>
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="panel panel-info">
            <div class="panel-heading"><i class="fa fa-info-circle"></i> 商品扩展属性管理</div>
            <div class="panel-body">
                <div class="ibox-query">
                    <form id="nonStandardDrugsForm" method="post" class="form-horizontal" enctype="multipart/form-data">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">选择平台</label>
                            <div class="col-sm-2">
                                <select id="topChannelCode" name="topChannelCode" style="width: 200px;"></select>
                            </div>
                            <label class="col-sm-1 control-label">商品编码</label>
                            <div class="col-sm-2"><input name="goodsCode" id="searchGoodsCode" class="form-control" type="text"></div>
                            <label class="col-sm-1 control-label">SKU映射码</label>
                            <div class="col-sm-2"><input name="mappingSkuCode" id="searchMappingSkuCode" class="form-control" type="text"></div>
                            <div class="col-sm-2" style="text-align: right">
                                <button style="margin-left: 30px;" class="btn btn-info" onclick='$.openx.query()' type="button"><i class="glyphicon glyphicon-search"></i> 查询
                                </button>
                                <button style="margin-left: 10px;" class="btn btn-info" onclick="resetForm()" type="button"><i class="glyphicon glyphicon-share-alt"></i> 重置  </button>

                            </div>
                        </div>
                    </form>
                </div>

                <div class="row row-lg">
                    <div class="col-sm-12">
                        <div class="bars pull-left">
                            <button class="btn btn-warning" onclick='$.openx.insert()' type="button"><i
                                class="glyphicon glyphicon-plus"></i> 新增
                        </button>
                            <button class="btn btn-primary" onclick='$.openx.import()' type="button"><i
                                class="glyphicon glyphicon-pencil"></i> 导入
                        </button>
                            <button class="btn btn-danger" onclick='$.openx.delete()' type="button"><i
                                class="glyphicon glyphicon-trash"></i> 删除
                        </button>
                        </div>
                        <table id="table" data-show-export="true">
                            <thead>
                                <tr>
                                    <th data-checkbox="true"></th>
                                    <th data-field="id" data-visible="false"></th>
                                    <th data-align="center" data-formatter="showFormatTopChannelCode" data-field="topChannelCode">平台</th>
                                    <th data-align="center" data-field="goodsCode">商品编码</th>
                                    <th data-align="center" data-field="name">商品名称</th>
                                    <th data-align="center" data-field="goodsType">商品类型</th>
                                    <th data-align="center" data-field="nonStandardDrug">非标商品</th>
                                    <th data-align="center" data-field="mappingSkuCode">SKU映射码</th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div id="import-form" class="modal fade" aria-hidden="true"
         style="display: none;">
        <div class="modal-dialog" style="width: 500px;">
            <div class="modal-content animated bounceInTop">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"
                            aria-hidden="true">&times;</button>
                    <h4 class="modal-title">非标商品批量导入</h4>
                </div>
                <div class="modal-body" style="padding-top: 0px;">
                    <form class="form-horizontal" name="uploadForm" id="uploadForm" enctype="multipart/form-data" method="post">
                        <div style="width: 450px; height: 260px;">
                            <div class="row" style="padding-top: 15px;text-align: left;">
                                <label class="col-sm-3" style="padding-top: 8px;">选择平台：</label>
                                <div class="col-sm-6">
                                    <select id="importTopChannelCode" name="topChannelCode" style="width: 200px;">
                                    </select>
                                </div>
                            </div>
                            <div class="row" style="padding-top: 15px;">
                                <label class="col-sm-3" style="padding-top: 8px;">请选择</label>
                                <div class="col-sm-6">
                                    <input style="width: 180px; padding-top: 5px;" name="excelFile" type="file" id="excelFileInput"/>
                                </div>
                            </div>
                            <div class="row" style="padding-top: 15px;text-align: left;">
                                <div class="col-sm-6">
                                    <a href="https://img.yifengx.com/zt/templet/非标品导入模版.xlsx" style="text-decoration: underline;"><span style="color: blue;">模板下载</span></a>
                                </div>
                            </div>
                            <br />
                            <div class="row" style="padding-top: 15px;">
                                <div class="col-sm-3">&nbsp;</div>
                                <div class="col-sm-6">
                                    <button class="btn btn-info" type="button" onclick="importExcel()" id="importExcelButton">导入</button>
                                </div>
                            </div>
                            <br />
                            <br />
                            <div class="row" style="padding-top: 30px;">
                                <div class="col-sm-2">&nbsp;</div>
                                <div class="col-sm-10" id="uploadImgResult"></div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer"
                     style="margin: 0 auto; text-align: center;">
                    <button class="btn btn-sm btn-default" type="button"
                            data-dismiss="modal">
                        <strong>取消</strong>
                    </button>
                </div>
            </div>
        </div>
    </div>
</body>
<script type="text/html" id="nonstandardGoodsDialog">
        <form class="form-horizontal" id="saveNonstandardGoodsForm">

            <div class="col-md-12" style="overflow: visible;margin-top: 70px;">
                <div class="form-group">
                    <label class="col-sm-4 control-label"><font color="red">* </font>选择平台：</label>
                    <div class="col-sm-8">
                        <select id="saveTopChannelCode" name="topChannelCode" style="width: 200px;">
						</select>
                        <!--<div id="select2-ProductId241"></div>-->
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-4 control-label"><font color="red">* </font>商品编码：</label>
                    <div class="col-sm-8">
                        <input name="goodsCode" id="goodsCode" class="form-control" placeholder="请输入商品编码" type="text" title="必填字段" required="true" value="{{!d.goodsCode ? '':d.goodsCode}}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-4 control-label">商品名称：</label>
                    <div class="col-sm-8">
                        <input name="name" id="goodsName" class="form-control" placeholder="请输入商品名称" type="text"  value="{{!d.goodsName ? '':d.goodsName}}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-4 control-label">非标品：</label>
                    <div class="col-sm-8">
                        <div class="radio radio-info radio-inline">
                            <input type="radio" name="nonStandardDrug" id="statusRadio1"  value="true" />
                            <label for="statusRadio1"> 是 </label>
                        </div>
                        <div class="radio radio-danger radio-inline">
                            <input type="radio" name="nonStandardDrug" id="statusRadio2"  value="false" />
                            <label for="statusRadio2"> 否</label>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-4 control-label">SKU映射码：</label>
                    <div class="col-sm-8">
                        <input name="mappingSkuCode" id="mappingSkuCode" class="form-control" placeholder="请输入SKU映射码" type="text" value="{{!d.mappingSkuCode ? '':d.mappingSkuCode}}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-4 control-label">商品类型名称：</label>
                    <div class="col-sm-8">
                        <input name="goodsType" id="goodsType" class="form-control" placeholder="请输入商品类型名称" type="text" value="{{!d.goodsType ? '':d.goodsType}}">
                    </div>
                </div>
            </div>
        </form>
</script>

<script src="../../res/plugins/yifeng/lbsAreaSelect.js?v=1.22.0"></script>
<script type="text/javascript">
    (function() {
        $.openx.loadScript(['../../res/plugins/yifeng/partner.js', '../../res/plugins/iCheck/icheck.min.js', '../../js/goods/nonstandardGoods.js', '../../res/js/ajaxUtil.js']);
    })();
</script>

</html>